package com.baiyi.homeui.hshomeui.tv;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.widget.TextView;

@SuppressLint("AppCompatCustomView")
public class RogTextview extends TextView {
    String path = "fonts/rog.OTF";
    public RogTextview(Context context) {
        super(context);
        Typeface typeface = Typeface.createFromAsset(context.getAssets(),path );
        //设置字体
        setTypeface(typeface);
    }

    public RogTextview(Context context, AttributeSet attrs) {
        super(context, attrs);
        Typeface typeface = Typeface.createFromAsset(context.getAssets(), path);
        //设置字体
        setTypeface(typeface);
    }

    public RogTextview(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        Typeface typeface = Typeface.createFromAsset(context.getAssets(), path);
        //设置字体
        setTypeface(typeface);
    }

}
